package com.ptszyxx.popose.common.enums;

import com.ysg.utils.YStringUtil;

public enum MainTabEnum {
    home(0, "首页"),
    dynamic(1, "动态"),
//    map(2, "地图"),
    message(2, "消息"),
    mine(3, "我的");

    private int type;
    private String name;

    MainTabEnum(int type, String name){
        this.type = type;
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static MainTabEnum get(String name){
        MainTabEnum[] values = values();
        for (MainTabEnum item: values) {
            if (YStringUtil.eq(item.getName(), name)){
                return item;
            }
        }
        return null;
    }

}
